package com.tudouji.project.mt.service.impl;

import java.util.List;
import com.tudouji.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tudouji.project.mt.mapper.MtFoodcostcarditemMapper;
import com.tudouji.project.mt.domain.MtFoodcostcarditem;
import com.tudouji.project.mt.service.IMtFoodcostcarditemService;

/**
 * 美团成本卡明细明细Service业务层处理
 * 
 * @author tudouji
 * @date 2023-12-04
 */
@Service
public class MtFoodcostcarditemServiceImpl implements IMtFoodcostcarditemService 
{
    @Autowired
    private MtFoodcostcarditemMapper mtFoodcostcarditemMapper;

    /**
     * 查询美团成本卡明细明细
     * 
     * @param id 美团成本卡明细明细ID
     * @return 美团成本卡明细明细
     */
    @Override
    public MtFoodcostcarditem selectMtFoodcostcarditemById(Long id)
    {
        return mtFoodcostcarditemMapper.selectMtFoodcostcarditemById(id);
    }

    /**
     * 查询美团成本卡明细明细列表
     * 
     * @param mtFoodcostcarditem 美团成本卡明细明细
     * @return 美团成本卡明细明细
     */
    @Override
    public List<MtFoodcostcarditem> selectMtFoodcostcarditemList(MtFoodcostcarditem mtFoodcostcarditem)
    {
        return mtFoodcostcarditemMapper.selectMtFoodcostcarditemList(mtFoodcostcarditem);
    }

    /**
     * 新增美团成本卡明细明细
     * 
     * @param mtFoodcostcarditem 美团成本卡明细明细
     * @return 结果
     */
    @Override
    public int insertMtFoodcostcarditem(MtFoodcostcarditem mtFoodcostcarditem)
    {
        mtFoodcostcarditem.setCreateTime(DateUtils.getNowDate());
        return mtFoodcostcarditemMapper.insertMtFoodcostcarditem(mtFoodcostcarditem);
    }

    /**
     * 修改美团成本卡明细明细
     * 
     * @param mtFoodcostcarditem 美团成本卡明细明细
     * @return 结果
     */
    @Override
    public int updateMtFoodcostcarditem(MtFoodcostcarditem mtFoodcostcarditem)
    {
        mtFoodcostcarditem.setUpdateTime(DateUtils.getNowDate());
        return mtFoodcostcarditemMapper.updateMtFoodcostcarditem(mtFoodcostcarditem);
    }

    /**
     * 批量删除美团成本卡明细明细
     * 
     * @param ids 需要删除的美团成本卡明细明细ID
     * @return 结果
     */
    @Override
    public int deleteMtFoodcostcarditemByIds(Long[] ids)
    {
        return mtFoodcostcarditemMapper.deleteMtFoodcostcarditemByIds(ids);
    }

    /**
     * 删除美团成本卡明细明细信息
     * 
     * @param id 美团成本卡明细明细ID
     * @return 结果
     */
    @Override
    public int deleteMtFoodcostcarditemById(Long id)
    {
        return mtFoodcostcarditemMapper.deleteMtFoodcostcarditemById(id);
    }
}
